|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--cnrg.itx.datax.devices.AudioProperty
Class that models the properties of an audio device. This class has information about the audio sampling rate and the sample size.
| Field Summary | |
static int |
A_LAW
|
private int |
bitsPerSample
The number of bits per sample. |
static int |
MU_LAW
|
static int |
PCM
Some of the supported audio formats. |
private int |
sampleFormat
The audio format used for sampling. |
private int |
sampleRate
The sampling rate. |
| Constructor Summary | |
AudioProperty(int sampleRate,
int bitsPerSample,
int sampleFormat)
Creates an audioProperty. |
|
| Method Summary | |
PropertiesCollection |
findOptimal(PropertiesCollection pc)
Finds the optimal set of properties when merging this property with a properties collection. |
int |
getBitsPerSample()
Returns the number of bits that each sample contains. |
int |
getSampleFormat()
Get the format of the sample (PCM< MU_LAW, A_LAW). |
int |
getSampleRate()
Returns the sample rate in terms of bits per second. |
PropertiesCollection |
merge(PropertiesCollection pc)
Merges the audio property in the property collection. |
java.lang.String |
toString()
Tranforms this class into String format. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
public static final int PCM
public static final int MU_LAW
public static final int A_LAW
private int sampleRate
private int bitsPerSample
private int sampleFormat
| Constructor Detail |
public AudioProperty(int sampleRate,
int bitsPerSample,
int sampleFormat)
sampleRate - the rate of audio samples, in terms of bytes per secondbitsPerSample - the number of bits that a sample contains. Typical values include 8 or 16sampleFormat - the format of the sample (PCM, MU_LAW, A_LAW)| Method Detail |
public int getSampleRate()
public int getBitsPerSample()
public int getSampleFormat()
public PropertiesCollection merge(PropertiesCollection pc)
throws DataException
pc - the properties collection to merge the audio property with
public PropertiesCollection findOptimal(PropertiesCollection pc)
throws DataException
pc - the properties collection to find the optimal properties frompublic java.lang.String toString()
String format.String depiction of AudioProperty
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||